<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>我的申请</title>
    <%@include file="/WEB-INF/views/modules/cms/front/include/head.jsp"%>
    <meta name="decorator" content="cms_default_${site.theme}"/>
    <meta name="description" content="ccjzxyxt ${site.description}"/>
    <meta name="keywords" content="ccjzxyxt ${site.keywords}"/>
    <script type="application/javascript">
        var ctxAdmin = "${ctxAdmin}";
    </script>
    <script src="${ctxStatic}/front/js/jquery_myApply.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe1.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe2.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe3.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe4.js" type="text/javascript"></script>
    <script src="${ctxStatic}/front/js/pageMe5.js" type="text/javascript"></script>
</head>
<body style="background: #f8f8f8;">
<!--content-->
<div class="wrap">
    <div class="perleft">
        <ul>
            <c:if test="${user.userType ne '1'}">
                <c:forEach items="${fns:getNavMenuList()}" var="menu">
                    <li class="${requestScope.menu.id eq menu.id ? 'on' : ''}"><a
                            href="${ctxAdmin}${menu.href}?origin=front" target=""><span>${menu.name}</span></a></li>
                </c:forEach>
            </c:if>
        </ul>
    </div>
    <div class="perright">
        <sys:message content="${message}" hideMsgBox="true"/>
        <h2 class="tabtit applytit">
            <i class="${requestScope.tabIndex eq null || requestScope.tabIndex eq '' || requestScope.tabIndex eq '0' ? 'active' : ''}">全部</i>
            <i class="${requestScope.tabIndex eq '1' ? 'active' : ''}">未申请</i>
            <i class="${requestScope.tabIndex eq '2' ? 'active' : ''}">已申请</i>
            <i class="${requestScope.tabIndex eq '3' ? 'active' : ''}">已通过</i>
            <i class="${requestScope.tabIndex eq '4' ? 'active' : ''}">未通过</i>
            <i class="${requestScope.tabIndex eq '5' ? 'active' : ''}">已结束</i>
            <i>申请</i></h2>
        <input id="tabIndex" name="tabIndex" type="hidden" value="${requestScope.tabIndex}">
        <form:form id="searchForm" action="" method="post">
            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
            <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
            <input id="recordCount" name="recordCount" type="hidden" value="${page.count}"/>
            <input id="checkFlag" name="checkFlag" type="hidden" value="">
        </form:form>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <c:if test="${bizVmApply.checkFlag eq '0'}">
                                <li>
                                    <a href="#" onclick="getBizVmApply('${bizVmApply.id}')">修改</a>
                                    <a href="#" onclick="confirmDel('${bizVmApply.id}')" class="bluebg">删除</a>
                                    <a href="#" onclick="confirmApply('${bizVmApply.id}')" class="greenbg">申请</a>
                                </li>
                            </c:if>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <a href="#" onclick="getBizVmApply('${bizVmApply.id}')">修改</a>
                                <a href="#" onclick="confirmDel('${bizVmApply.id}')" class="bluebg">删除</a>
                                <a href="#" onclick="confirmApply('${bizVmApply.id}')" class="greenbg">申请</a>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage1" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage2" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage3" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage4" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont">
            <c:forEach items="${page.list}" var="bizVmApply" varStatus="i">
                <div class="tcbox">
                    <div class="img fl"><img src="${ctxStatic}/front/images/icon.png"></div>
                    <div class="tc fl">
                        <h3>${bizVmApply.name}</h3>
                        <ul>
                            <li>
                                <p>申请使用开始时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyStartDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>申请使用结束时间</p>
                                <span><fmt:formatDate value="${bizVmApply.applyEndDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                            <li>
                                <p>审核人姓名</p>
                                <span>${bizVmApply.checkName}</span>
                            </li>
                            <li>
                                <p>审核时间</p>
                                <span><fmt:formatDate value="${bizVmApply.checkDate}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </li>
                        </ul>
                    </div>
                    <c:if test="${bizVmApply.checkFlag eq '0'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wsq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '1'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ysq.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '2'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/ytg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '3'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/wtg.png"></div>
                    </c:if>
                    <c:if test="${bizVmApply.checkFlag eq '4'}">
                        <div class="sqstata fr"><img src="${ctxStatic}/front/images/yjs.png"></div>
                    </c:if>
                </div>
            </c:forEach>
            <center>
                <div id="myApplyPage5" class="page_div"></div>
            </center>
        </div>
        <div class="tabcont applycont apply">
            <form:form id="inputForm" modelAttribute="bizVmApply" action="" method="post" onsubmit="return checkSaveForm()">
                <input type="text" name="checkFlag" value="0" hidden="true"/>
                <h2>云服务器套餐配置信息</h2>
                <div class="inputgroup">
                    <label>名称:</label>
                    <input type="text" name="name" id="name1" class="text required" maxlength="50" onblur="ValidateUtil.checkInputNull('name1','名称')" />
                    <div class="clear"></div>
                    <span id="name1Error" class="errorts"> </span>
                </div>
                <div class="inputgroup">
                    <label>使用开始时间:</label>
                    <input name="applyStartDate" id="applyStartDate1" type="text" readonly="readonly" maxlength="20" class="text required"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});" onblur="ValidateUtil.checkApplyStartDate('applyStartDate1')"/>
                    <div class="clear"></div>
                    <span id="applyStartDate1Error" class="errorts"> </span>
                </div>
                <div class="inputgroup">
                    <label>使用结束时间:</label>
                    <input name="applyEndDate" id="applyEndDate1" type="text" readonly="readonly" maxlength="20" class="text required"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});" onblur="ValidateUtil.checkApplyEndDate('applyStartDate1','applyEndDate1')"/>
                    <div class="clear"></div>
                    <span id="applyEndDate1Error" class="errorts"> </span>
                </div>
                <div class="inputgroup">
                    <label>申请原因：</label>
                    <textarea name="applyReason" id="applyReason1" maxlength="100"></textarea>
                </div>
                <shiro:hasPermission name="biz:bizVmApply:edit">
                    <input  class="btn savebtn xgbtn" type="button"  onclick="save()" value="保存"/>
                    <input  class="btn greenbg xgsqbtn" type="button"  onclick="apply()" value="申请"/>
                </shiro:hasPermission>
            </form:form>
        </div>
        <div class="modal modifyModal">
            <!--弹窗内容-->
            <div class="modal_content">
                <!--弹窗头部-->
                <div class="modal_header">
                    <h2>修改:云服务器套餐配置信息<span class="closebtn modifyclose">&times;</span></h2>
                </div>
                <!--弹窗中间内容-->
                <h2></h2>
                <form:form id="modifyForm" modelAttribute="bizVmApply" action="" method="post" onsubmit="return checkForm()">
                    <input type="text" name="id" id="id" hidden="true"/>
                    <div class="inputgroup">
                        <label>名称:</label>
                        <input type="text" name="name" id="ApplyName" class="text" maxlength="50" onblur="ValidateUtil.checkInputNull('ApplyName','名称')"/>
                        <div class="clear"></div>
                        <span id="ApplyNameError" class="errorts"> </span>
                    </div>
                    <div class="inputgroup">
                        <label>使用开始时间:</label>
                        <input name="applyStartDate" id="applyStartDate" type="text" readonly="readonly" maxlength="20" class="text"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});" onblur="ValidateUtil.checkApplyStartDate('applyStartDate')"/>
                        <div class="clear"></div>
                        <span id="applyStartDateError" class="errorts"> </span>
                    </div>
                    <div class="inputgroup">
                        <label>使用结束时间:</label>
                        <input name="applyEndDate" id="applyEndDate" type="text" readonly="readonly" maxlength="20" class="text"
                               onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});" onblur="ValidateUtil.checkApplyEndDate('applyStartDate','applyEndDate')"/>
                        <div class="clear"></div>
                        <span id="applyEndDateError" class="errorts"> </span>
                    </div>
                    <div class="inputgroup">
                        <label>申请原因：</label>
                        <textarea name="applyReason"   id="applyReason" maxlength="100">
                        </textarea>
                    </div>
                        <input  class="btn savebtn xgbtn" type="button"  onclick="saveApply()" value="保存"/>
                        <input  class="btn greenbg xgsqbtn" type="button"  onclick="MyApply()" value="申请"/>
                </form:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
